/*
	Author      : Sidek Sirun
	Course      : UCI Java Programming I (X460.10)
	Assignment 5: Student subclass

	Create a subclass of your Person class called Student. 
	In addition to the existing Person attributes, a Student 
	has a college and dorm.
*/

// Person is superclass of Student. Student is subclass of Person.
public class Student extends Person {
	// Instance Variables
	private String college;
	private boolean dorm;

	// Constructors
	public Student(String firstName, String lastName, int age, String gender, String ssn, String college, boolean dorm) {
		super(firstName, lastName, age, gender, ssn);
		this.college = college;
		this.dorm    = dorm;
	}

	// Methods
	public void setCollege(String college) {
		this.college = college;
	}
	public String getCollege() {
		return college;
	}

	public boolean hasDorm() {
		return dorm;
	}

	public String toString() {
		String studentInfo = "Full Name: " + super.getFullName() + ", Age: " + super.getAge() 
		                     + ", Gender: " + super.getGender() + ", SSN: " + super.getSSN()
		                     + ", College: " + getCollege() + ", Dorm: " + hasDorm();
		return studentInfo;
	}
}